package com.zzu.model.bean;


import java.util.HashMap;
import java.util.Map;

public class PackageRoute {

    private String packageId;

    private String time;

    private String transNodeId;

    private Long handler;

    private Integer status;

    private Double x;

    private Double y;

    private String address;

    public static Map<Integer,String> NumToTextStatus = new HashMap<>();

    static{
        NumToTextStatus.put(0,"待揽收");
        NumToTextStatus.put(1,"已揽收");
        NumToTextStatus.put(2,"已发货");
        NumToTextStatus.put(3,"运输中");
        NumToTextStatus.put(4,"派送中");
        NumToTextStatus.put(5,"已签收");
    }

    public String getAddress() {
        return address;
    }



    public PackageRoute(String packageId, String transNodeId, Long handler, Integer status, Double x, Double y, String address) {
        this.packageId = packageId;
        this.transNodeId = transNodeId;
        this.handler = handler;
        this.status = status;
        this.x = x;
        this.y = y;
        this.address = address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public PackageRoute() {

    }

    public PackageRoute(String packageId, String transNodeId, Long handler, Integer status, Double x, Double y) {
        this.packageId = packageId;
        this.transNodeId = transNodeId;
        this.handler = handler;
        this.status = status;
        this.x = x;
        this.y = y;
    }

    public String getPackageId() {
        return packageId;
    }

    public void setPackageId(String packageId) {
        this.packageId = packageId;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getTransNodeId() {
        return transNodeId;
    }

    public void setTransNodeId(String transNodeId) {
        this.transNodeId = transNodeId;
    }

    public Long getHandler() {
        return handler;
    }

    public void setHandler(Long handler) {
        this.handler = handler;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Double getX() {
        return x;
    }

    public void setX(Double x) {
        this.x = x;
    }

    public Double getY() {
        return y;
    }

    public void setY(Double y) {
        this.y = y;
    }

    public String getStringStatue(){
        return NumToTextStatus.get(status);
    }

    @Override
    public String toString() {
        return "PackageRoute{" +
                "packageId='" + packageId + '\'' +
                ", time='" + time + '\'' +
                ", transNodeId='" + transNodeId + '\'' +
                ", handler=" + handler +
                ", status=" + status +
                ", x=" + x +
                ", y=" + y +
                '}';
    }
}
